home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
8bitfiles.net/archives
/
archives.tar
/
archives
/
compuserve-file-archive
/
10 Education Games
/
FCARD.BIN
(
.txt
)
< prev
next >
Wrap
Commodore BASIC
|
2019-04-13
|
8KB
|
298 lines
10 REM FLASHCARD
20 REM
30 REM ORIGINAL BY TOM RUGG AND PHIL FELDMAN
40 REM RE-WRITTEN BY R.E.BYERS
50 REM EXTENSIVELY RE-REWRITTEN BY TIM TEMPLE
60 REM OCT 12, 1986 .
110 POKE53280,5:POKE53281,15:PRINT"[144]"
120 POKE53272,23
130 DIMA$(255):GOSUB6000 :L=50:M=5:DIMK(26)
140 DIM F$(L),B$(L),P(L)
170 PRINT"[147] **** FLASHCARD PROGRAM ****"
180 GOTO 5270 :REM GO TO * MENU *
185 :
189 REM ENTER NEW CARDS +++++++++
190 K=1:PRINT
195 PRINT" (MINIMUM 5 CARDS)"
196 PRINT" (TYPE '@' TO QUIT)"
197 PRINT" (TYPE _ TO START OVER)"
200 PRINT"TYPE SIDE ONE OF CARD NO.";K:GOSUB7000:F$(K)=ZI$
210 IF F$(K)="@" OR F$(K)="" THEN 280
220 IF F$(K)="_" THEN 222
221 GOTO230
222 K=K-1:IF K<1 THEN K=1
225 PRINT:PRINT"STARTING OVER":GOTO 200
230 PRINT:PRINT"SIDE TWO":GOSUB7000:B$(K)=ZI$
240 IF B$(K)="_" THEN 225
250 PRINT:IF K>L-5 THENPRINT"MAXIMUM IS"L"CARDS."
260 K=K+1:IF K<=L THEN 200
270 PRINT:PRINT"THAT'S ALL THERE'S ROOM FOR."
280 PRINT:PRINT:K=K-1:GOTO 5270
282 PRINT""
285 :
289 REM DRILL ON A SET **********
290 IF K>=M THEN 310
300 PRINT:PRINT"THAT'S ONLY";K;"CARDS. MIN. IS";M:GOTO 5270
310 PRINT"[147]"
311 PRINT"TELL ME WHAT'S ON THE OTHER SIDE OF EACH";
320 PRINT"CARD THAT [201] SHOW YOU."
321 PRINT"DO YOU WISH TO SEE:":PRINT
322 PRINT"1.SIDE ONE ONLY"
323 PRINT"2.SIDE TWO ONLY"
324 PRINT"3.RANDOM CHOICE OF SIDES"
325 INPUT"WHAT IS YOUR CHOICE 1[157][157][157]";H$
326 H=VAL(H$):IF H=0 OR H>3 THEN 5270
330 RD=RND(-TI)
339 :
340 R=INT(K*RND(0)+1):ZZ=RND(0)
350 IF P(R)=2 THEN GOTO340
355 IF RT=R AND C<(K*2-2) THEN GOTO340
360 PRINT"[147] "N$
362 PRINT"PROGRESS ==>"C/2" OUT OF"K
365 PRINT"[ENTER A '@' TO END]"
370 ON H GOTO 500,520
390 IF RND(1)>.52 THEN 520:REM H=3
400 :
500 PRINT F$(R):C$=B$(R)
510 GOTO 530
520 PRINT B$(R):C$=F$(R)
530 PRINT"RESPONSE:"
532 GOSUB7000:R$=ZI$
535 IFR$="@"THEN675:REM TO QUIT
560 IF R$=C$ THEN 610:REM CORdT
565 :
570 PRINT"NO, THE CORRECT RESPONSE IS"
580 PRINT C$:PRINT"COPY IT."
585 W=W+1
590 GOSUB7000:R$=ZI$:PRINT
592 IFR$="@" OR R$="" THEN675
594 IF R$=C$ THEN 630
596 GOTO570
597 :
610 PRINT" RIGHT![146]":FORI=1TO750:NEXTI
620 C=C+1:P(R)=P(R)+1
630 RT=R
640 IF C=K*2 THEN GOTO 675
670 GOTO 340
675 FOR ER=1 TO K:P(ER)=0:NEXT
680 PRINT"[147]"TAB(20-LEN(N$)/2)""N$
690 GOSUB 1500
700 GOTO 5270
795 :
799 REM NEW SET OF CARDS+++++++
800 PRINT"[147] NEW CARD SET
810 [139] K[179]2 [137]860
820 [153]"(null)HIS WILL WIPE OUT THE CARDS IN MEMORY.
830 PRINT"IS THIS OKAY? (Y OR N)
840 [161]CH$:[139] CH$[178]""[167]840
850 [139] CH$[178]"N"[167][153]"LOAD";:[137]5270
860 [153]"":N$[178]"NEW CARD SET":[137]190
870 :
890 [143] REPLACE A CARD ++++++++
900 [153]"WHICH CARD DO YOU WISH TO REPLACE?"
910 [133] NQ$:NQ[178][197](NQ$)
912 [139] NQ[179]1 [137] 5270
915 [139]NQ[177]K [167]K[178]K[170]1:NQ[178]K:[137]195
920 [153]F$(NQ):[153]B$(NQ)
921 [153]"ANY CHANGE NEEDED? (Y OR N)
922 GETCH$:IF CH$=""THEN922
923 IF CH$="N"THEN5270
930 PRINT"TYPE SIDE ONE OF CARD #";NQ
940 GOSUB7000:F$(NQ)=ZI$:PRINT
950 PRINT"NOW TYPE SIDE TWO"
960 GOSUB7000:B$(NQ)=ZI$
970 IF F$(NQ)="" OR B$(NQ)="" THEN GOSUB 1000
980 PRINT""
990 GOTO5270
995 :
1000 FOR I=NQ+1 TO K
1010 F$(I-1)=F$(I):B$(I-1)=B$(I):NEXT
1020 IF K>1 THEN K=K-1
1030 PRINT"CARD DELETED."
1040 RETURN
1050 :
1500 PRINT
1505 IF C+W=0 THEN RETURN
1506 :
1509 REM GIVE SCORE +++++++++++
1510 PRINT" RESULTS:"
1520 PRINT C;"RIGHT OUT OF";C+W
1530 PRINT" GIVES YOU A GRADE OF"INT(C*100/(C+W));"%"
1540 C=0:W=0
1550 RETURN
1555 :
1998 :
1999 REM REVIEW ***********
2000 IF K<1 THENPRINT"NOTHING TO REVIEW":GOTO5270
2005 FOR J1=1 TO K
2010 :PRINT"[147] "N$;
2020 :PRINTTAB(20)"[146]CARD #";J1;" OF"K
2030 :PRINT" "F$(J1)
2040 :PRINT" "B$(J1)
2050 :GOSUB2090
2060 NEXT J1
2069 TT=20-LEN(N$)/2
2070 PRINT"[147]"TAB(TT)""N$
2080 GOTO5270
2085 :
2090 PRINT""
2100 PRINT" <HIT ANY KEY TO CONTINUE>[145]"
2110 GET B$:IF B$="" THEN2110
2120 PRINT" [145]"
2130 RETURN
3000 :
5000 IF K<1 THENPRINT"NOTHING TO SAVE":GOTO5270
5010 REM SAVE ON DISK **********
5020 PRINT:INPUT"NAME FOR FILE";N$
5025 IF N$=""THEN 5270
5030 FL$="F."+N$+",SEQ,WRITE"
5035 OPEN15,8,15:GOSUB9700:CLOSE15
5036 IF XX THEN STOP
5040 OPEN 1,8,2,"@0:"+FL$
5050 FOR J=1 TO K
5060 :PRINT#1,F$(J):PRINT#1,B$(J)
5065 :PRINTF$(J):PRINT" "B$(J)
5070 NEXT
5080 CLOSE 1
5090 PRINT""N$" SAVED"
5100 GOTO 5270
5105 :
5110 REM LOAD FROM DISK ********
5120 PRINT:INPUT"NAME OF DISK FILE";N$
5130 IF N$=""THEN 5270
5150 FL$="F."+N$+",SEQ":XX=0
5155 RESTORE:GOSUB 6000
5157 OPEN15,8,15:GOSUB9700
5158 IF XX THEN CLOSE15:GOTO5270
5160 OPEN 1,8,2,"0:"+FL$+",READ
5162 [141]9700
5163 [139] XX [167] 5250
5170 K[178]1:W[178]0:C[178]0
5180 [158]PL:CP[178][194](142)
5190 [139] ST[179][177]0 [167] 5240
5195 F$(K)[178][200](A$,CP):[153]F$(K)
5200 [158]PL:CP[178][194](142)
5210 B$(K)[178][200](A$,CP):[153]" "B$(K)
5230 K[178]K[170]1:[139] K[179]L[167] 5180
5240 K[178]K[171]1:[153]:[153]"LOADED";K;"CARDS"
5250 [160] 1:[160]15:[141]2100
5255 [153]"LOAD"[163]20[171][195](N$)[173]2)""N$
5260 [137]5270
5262 :
5265 [143] MENU +++++++++++++++++
5267 [153]"LOAD";
5270 [153]" ---OPTIONS---"
5275 [153]" 1 <= INSTRUCTIONS"
5280 [153]" 2 <= DISPLAY SETS ON DISK"
5290 [153]" 3 <= LOAD FLASHCARD SET"
5300 [153]" 4 <= REVIEW CURRENT SET
5310 PRINT" 5 <= DRILL ON CURRENT SET"
5320 PRINT" 6 <= REPLACE A CARD IN MEMORY"
5330 PRINT" 7 <= START A NEW FLASHCARD SET"
5340 PRINT" 8 <= SAVE CURRENT SET ON DISK"
5350 PRINT" 9 <= END PROGRAM"
5360 GET Q$:Q=VAL(Q$):IF Q=0 THEN 5360
5370 ON Q GOTO5410, 8000, 5120, 2000, 290, 900, 800, 5000, 5380:GOTO5360
5380 IF PL<8960 THEN PL=40960
5390 POKE55,PL-INT(PL/256)*256:POKE56,PL/256:CLR:PRINT"PROGRAM ENDED.":END
5395 :
5400 REM INSTRUCTIONS+++++++++++++
5410 PRINT"[147][201]NSTRUCTIONS"
5420 PRINT" [212]HE FOLLOWING POINTERS WILL HELP YOU GET THE MOST FROM THIS PROGRAM.
5430 [153]"* AVOID MAKING MORE THAN 25 CARDS.
5440 PRINT" YOU COULD MAKE UP TO 50, BUT DON'T.
5450 [153]"* REVIEW THE SET 3 OR 4 TIMES BEFORE YOU";
5460 [153]" DRILL ON THE SET; IT SAVES AGGRAVATION"
5470 [153]"* DRILL ON THE SET, LOOKING AT THE HARD
5480 PRINT" SIDE OF THE CARD, FIRST. THEN DRILL
5490 [153]" IN THE MIXED MODE. (null)ASTLY, DRILL,
5500 PRINT" LOOKING AT THE EASIER SIDE.
5510 [153]"* DRILLING TAKES CONCENTRATION; TRY TO
5520 PRINT" BE SOMEWHAT AWAKE WHEN YOU RUN THIS.
5530 [153]"* IF YOU TAKE A MENTAL BREAK AFTER YOU
5540 PRINT" HAVE DRILLED ON YOUR CARDS, THEY WILL
5550 [153]" STAY WITH YOU BETTER.
5560 GOSUB2090
5570 PRINT"[147][201]NSTRUCTIONS"
5580 PRINT" OPTIONS HELP"
5590 PRINT" 2 <= DISPLAY SETS ON DISK"
5600 PRINT" WILL SHOW ALL FLASH CARD SETS ON DISK";
5610 PRINT" 3 <= LOAD FLASHCARD SET"
5630 PRINT" 4 <= REVIEW CURRENT SET
5640 [153]" DISPLAYS EACH FLASH CARD, ONE BY ONE
5650 PRINT" 5 <= DRILL ON CURRENT SET"
5655 PRINT" 6 <= REPLACE A CARD IN MEMORY"
5660 PRINT" WILL APPEND TO THE SET IF YOU CHOOSE
5670 [153]" A NUMBER LARGER THAN ANY IN THE SET.
5680 PRINT" WILL DELETE A CARD YOU CHOOSE, IF YOU";
5690 PRINT" ENTER NOTHING ON EITHER SIDE OF IT.
5730 [153]" 7 <= START A NEW FLASHCARD SET"
5750 [153]" 8 <= SAVE CURRENT SET ON DISK"
5900 [141]2090:[137]5267
5999 :
6000 [143] ** STRING THING (UNIVERSAL) **
6010 [143] ** JIM BUTTERFIELD **
6020 [143] STRING MUST BE FIRST VARIABLE
6030 A$[178]"ABCDEFGHIJKLMNOPQ"
6040 A$[178]A$[170]A$[170]A$[170]A$[170]A$
6050 A$[178]A$[170]A$[170]A$
6060 [143] ABOVE SETS STRING AT MAX (255)
6070 [131] 160,2,177,45,153,137,0,200,192,6
6080 [131] 208,246,162,1,32,198,255
6090 [131] 32,228,255,201,13,240,11,164,142,145
6100 [131] 140,200,132,142,196,139,208,238,76,204,255
6101 TM[178][194](55)[170]256[172][194](56)
6102 PL[178]TM[171]38
6110 [129]JZ[178]PL[164]TM[171]1:[135]XZ%:[151]JZ,XZ%:TZ[178]TZ[170]XZ%:[130]JZ
6120 [139]TZ[179][177]5535[167][144]
6125 TZ[178]0
6130 [142]
6135 :
7000 [143] CHARACTER GET ******
7010 ZL[178]159:[143] TOTAL CHARACTERS IN STRING (MAX=255)
7020 ZI$[178]""
7030 [161]ZG$:[139]ZG$[179][177]""[167]7050
7040 [153]"<CMD";:[137]7030
7050 [153]" CMD";:Z9[178][198](ZG$):Z8[178][195](ZI$)
7060 [139]Z9[178]20[176]Z9[178]157[167]7130
7070 [139]Z9[178]13[167]7180
7080 [139]Z8[178]ZL[167]7030
7090 [139]Z9[178]34[167] 7030
7100 [139]Z9[177]218[176]Z9[179]32[167]7030
7110 [153]ZG$;:ZI$[178]ZI$[170]ZG$
7120 [137]7030
7130 [139]Z8[178]0[167]7030
7140 [153]"CMD CMD";
7150 [139]Z8[178]1[167]7020
7160 ZI$[178][200](ZI$,Z8[171]1)
7170 [137]7030
7180 [143] IFZ8=0THEN7030
7190 [153]:[142]
7200 :
7999 [143] DIRECTORY *************
8000 [159]1,8,0,"$0:F.*"
8010 N$[178][199](0):[153]""
8020 [161]#1,A$,A$
8030 [161]#1,A$,A$
8040 [139] A$[178]""[167] 8120
8050 [161]#1,B1$,B2$
8070 BK$[178][196]([198](B1$[170]N$)[170][198](B2$[170]N$)[172]256)
8080 [161]#1,A$:NA$[178]NA$[170]A$
8090 [139] A$[178]""[167][141]8130:[137]8030
8100 [143] PRINTA$;
8110 [137]8080
8120 [160]1:[137]5270
8130 :
8140 NA$[178]BK$[170]NA$:NT$[178]NA$
8150 NA$[178][202](NA$,5,23)
8160 [139] [200](NA$,1)[179][177]" " [167] [153]NT$
8170 [139] [202](NA$,3,2)[178]"F." [167] YN[178][171]1
8180 [139] YN [167] NA$[178][199](34)[170][201](NA$,19)[170]" "[170]BK$[170]" BLOCKS"
8190 [139] YN [167] [153]NA$
8280 NA$[178]"":BK$[178]"":YN[178]0:[142]
8290 :
9700 [132]15,W,W1$,W2$,W3$
9710 [139] (W[178]50) [176] (W[179]20) [167] [142]
9720 [153]"DISK ERROR: "W1$:XX[178][171]1
9730 [142]